<?php
class Characteristic {

    var $id;
    var $denomination;
    var $categorie;
    var $dimension;
    var $weight;
    var $type;
    var $nature;
    var $threshold;
    private $value;


    public function __construct($id, $denomination, $categorie, $dimension, $weight, $type, $nature, $threshold){
        $this->id = $id;
        $this->denomination = $denomination;
        $this->categorie = $categorie;
        $this->dimension = $dimension;
        $this->weight = $weight;
        $this->type = $type;
        $this->nature = $nature;
        $this->threshold = $threshold;
    }


    public function setValue($value){
        switch ($this->nature){

            case "Booleana":
                $this->value = FuzzyValue::fromBoolean($value);
                break;
            case "Difusa":
                $this->value = FuzzyValue::fromLinguistic($value);
                break;
            case "Numerica":
                $this->value = FuzzyValue::fromNumeric($value);
                break;

            default:
                throw new Exception("Unknown nature '" + $this->nature  + "'");

        }

    }

    public function getValue(){
        return $this->value;
    }

};


$CHARACTERISTICS = array();

$CHARACTERISTICS[1] = new Characteristic(
    1,
    "Existen expertos, están disponibles y son cooperativos",
    "Experto",
    "P1",
    10,
    "Esencial",
    "Booleana",
    "Si"
    );

$CHARACTERISTICS[2] = new Characteristic(
    2,          #ID
    "El experto es capaz de estructurar sus métodos y procedimientos de trabajo", #DENOMINATION
    "Experto",  #CATEGORIE
    "P2",       #DIMENSION
    7.0,          #WEIGHT
    "Deseable", #TYPE
    "Difusa",   #NATURE
    "No"        #THRESHOLD
    );


$CHARACTERISTICS[3] = new Characteristic(
    3,          #ID
    "La tarea está bien estructurada y se entiende.", #DENOMINATION
    "Tarea",    #CATEGORIE
    "P3",       #DIMENSION
    8.0,          #WEIGHT
    "Deseable", #TYPE
    "Difusa",   #NATURE
    "No"        #THRESHOLD
    );



$CHARACTERISTICS[4] = new Characteristic(
    4,   #ID
    "Existen suficientes casos de prueba y sus soluciones asociadas.", #DENOMINATION
    "Tarea", #CATEGORIE
    "P4", #DIMENSION
    10.0,   #WEIGHT
    "Esencial", #TYPE
    "Numerica", #NATURE
    "8"  #THRESHOLD
    );



$CHARACTERISTICS[5] = new Characteristic(
    5,   #ID
    "La tarea sólo depende de los conocimientos y no del sentido común.", #DENOMINATION
    "Tarea", #CATEGORIE
    "P5", #DIMENSION
    9.0,   #WEIGHT
    "Deseable", #TYPE
    "Numerica", #NATURE
    "9"  #THRESHOLD
    );

$CHARACTERISTICS[6] = new Characteristic(
    6,   #ID
    "Resuelve una tarea útil y necesaria", #DENOMINATION
    "Tarea", #CATEGORIE
    "J1", #DIMENSION
    8.0,   #WEIGHT
    "Deseable", #TYPE
    "Difusa", #NATURE
    "No"  #THRESHOLD
    );

$CHARACTERISTICS[7] = new Characteristic(
    7,   #ID
    "Se espera una alta tasa de recuperación de la inversión", #DENOMINATION
    "Directivos/Usuarios", #CATEGORIE
    "J2", #DIMENSION
    7,   #WEIGHT
    "Deseable", #TYPE
    "Numerica", #NATURE
    "No"  #THRESHOLD
    );

$CHARACTERISTICS[8] = new Characteristic(  8, 
  "Hay escasez de experiencia humana",
  "Experto", 
  "J3", 
  +6, 
  "Deseable", 
  "Difusa", 
  "No" 
  );


$CHARACTERISTICS[9] = new Characteristic(  9, 
  "Hay necesidad de tomar decisiones en situaciones críticas o ambientes hostiles,penosos, y, o, poco gratificantes",
  "Tarea", 
  "J4", 
  +10, 
  "Deseable", 
  "Difusa", 
  "No " 
  );
   $CHARACTERISTICS[10] = new Characteristic(  10, 
  "Hay necesidad de distribuir los conocimientos",
  "Tarea", 
  "J5", 
  +10, 
  "Deseable", 
  "Difusa", 
  "No " 
  );
   $CHARACTERISTICS[11] = new Characteristic(  11, 
  "Los conocimientos pueden perderse de no realizarse el sistema",
  "Experto", 
  "J6", 
  +10, 
  "Deseable", 
  "Difusa", 
  "No" 
  );
   $CHARACTERISTICS[12] = new Characteristic(  12, 
  "No existen soluciones alternativas",
  "Tarea", 
  "J7", 
  +8, 
  "Esencial", 
  "Booleana", 
  "Sí" 
  );
   $CHARACTERISTICS[13] = new Characteristic(  13, 
  "La transferencia de experiencia entre humanos es factible",
  "Tarea", 
  "A1", 
  +7, 
  "Deseable", 
  "Difusa", 
  "No" 
  );
   $CHARACTERISTICS[14] = new Characteristic(  14, 
  "La tarea requiere “experiencia”",
  "Tarea", 
  "A2", 
  +10, 
  "Deseable", 
  "Difusa", 
  "No" 
  );
   $CHARACTERISTICS[15] = new Characteristic(  15, 
  "Los efectos de la introducción del SE no pueden preverse",
  "Tarea", 
  "A3", 
  -2, 
  "Deseable", 
  "Difusa", 
  "No" 
  );
   $CHARACTERISTICS[16] = new Characteristic(  16, 
  "La tarea requiere razonamiento simbólico",
  "Tarea", 
  "A4", 
  +5, 
  "Deseable", 
  "Difusa", 
  "No" 
  );
   $CHARACTERISTICS[17] = new Characteristic(  17, 
  "La tarea requiere el uso de” heurísticas” para acotar el espacio de búsqueda",
  "Tarea", 
  "A5", 
  +7, 
  "Deseable", 
  "Difusa", 
  "No" 
  );
   $CHARACTERISTICS[18] = new Characteristic(  18, 
  "La tarea es de carácter público y más táctica que estratégica",
  "Tarea", 
  "A6", 
  +8, 
  "Deseable", 
  "Booleana", 
  "No" 
  );
   $CHARACTERISTICS[19] = new Characteristic(  19, 
  "Se espera que la tarea continúe sin cambios significativos durante un largo (mucho) período de tiempo",
  "Tarea", 
  "A7", 
  +8, 
  "Esencial", 
  "Difusa", 
  "Sí" 
  );
   $CHARACTERISTICS[20] = new Characteristic(  20, 
  "Se necesitan varios niveles de abstracción en la resolución de la tarea",
  "Tarea", 
  "A8", 
  +8, 
  "Deseable", 
  "Difusa", 
  "No" 
  );
   $CHARACTERISTICS[21] = new Characteristic(  21, 
  "El problema es relativamente simple o puede descomponerse en subproblemas",
  "Tarea", 
  "A9", 
  +6, 
  "Deseable", 
  "Difusa", 
  "No" 
  );
   $CHARACTERISTICS[22] = new Characteristic(  22, 
  "El experto no sigue un proceso determinista en la resolución del problema",
  "Experto", 
  "A10", 
  +3, 
  "Deseable", 
  "Booleana", 
  "No" 
  );
   $CHARACTERISTICS[23] = new Characteristic(  23, 
  "La tarea acepta la técnica del prototipado gradual",
  "Tarea", 
  "A11", 
  +8, 
  "Deseable", 
  "Booleana", 
  "No" 
  );
   $CHARACTERISTICS[24] = new Characteristic(  24, 
  "El experto resuelve el problema a veces con información incompleta o incierta",
  "Experto", 
  "A12", 
  +3, 
  "Deseable", 
  "Difusa", 
  "No" 
  );
   $CHARACTERISTICS[25] = new Characteristic(  25, 
  "Es conveniente justificar las soluciones adoptadas",
  "Tarea", 
  "A13", 
  +3, 
  "Deseable", 
  "Difusa", 
  "No " 
  );
   $CHARACTERISTICS[26] = new Characteristic(  26, 
  "La tarea requiere investigación básica",
  "Tarea", 
  "A14", 
  -10, 
  "Esencial", 
  "Booleana", 
  "Sí" 
  );
   $CHARACTERISTICS[27] = new Characteristic(  27, 
  "El sistema funcionará en “tiempo real” con otros programas o dispositivos",
  "Tarea", 
  "A15", 
  -6, 
  "Deseable", 
  "Difusa", 
  "No" 
  );
   $CHARACTERISTICS[28] = new Characteristic(  28, 
  "Existe una ubicación idónea para el SE",
  "Directivos/Usuarios", 
  "E1", 
  +7, 
  "Deseable", 
  "Difusa", 
  "No" 
  );
   $CHARACTERISTICS[29] = new Characteristic(  29, 
  "Problemas similares se han resuelto mediante INCO",
  "Tarea", 
  "E2", 
  +8, 
  "Deseable", 
  "Booleana", 
  "No " 
  );
   $CHARACTERISTICS[30] = new Characteristic(  30, 
  "El problema es similar a otros en los que resultó imposible aplicar esta tecnología",
  "Tarea", 
  "E3", 
  -5, 
  "Deseable", 
  "Booleana", 
  "No" 
  );
   $CHARACTERISTICS[31] = new Characteristic(  31, 
  "La continuidad del proyecto está influenciada por vaivenes políticos",
  "Directivos/Usuarios", 
  "E4", 
  -9, 
  "Esencial", 
  "Difusa", 
  "Sí" 
  );
   $CHARACTERISTICS[32] = new Characteristic(  32, 
  "La inserción del sistema se efectúa sin traumas, es decir, apenas se interfiere en la rutina cotidiana",
  "Directivos/Usuarios", 
  "E5", 
  +8, 
  "Deseable", 
  "Difusa", 
  "No" 
  );
   $CHARACTERISTICS[33] = new Characteristic(  33, 
  "Se dispone de experiencia en INCO",
  "Tarea", 
  "E6", 
  +7, 
  "Deseable", 
  "Difusa", 
  "No" 
  );
   $CHARACTERISTICS[34] = new Characteristic(  34, 
  "Se dispone de los recursos humanos,hardware y software necesarios para el desarrollo e implementación del sistema",
  "Tarea", 
  "E7", 
  +4, 
  "Deseable", 
  "Difusa", 
  "No" 
  );
   $CHARACTERISTICS[35] = new Characteristic(  35, 
  "El experto resuelve el problema en la actualidad",
  "Experto", 
  "E8", 
  +4, 
  "Deseable", 
  "Difusa", 
  "No" 
  );
   $CHARACTERISTICS[36] = new Characteristic(  36, 
  "La solución del problema es prioritaria para la institución",
  "Directivos/Usuarios", 
  "E9", 
  +8, 
  "Esencial", 
  "Difusa", 
  "Sí" 
  );
   $CHARACTERISTICS[37] = new Characteristic(  37, 
  "Las soluciones son explicables",
  "Tarea", 
  "E10", 
  +5, 
  "Deseable", 
  "Difusa", 
  "No" 
  );
   $CHARACTERISTICS[38] = new Characteristic(  38, 
  "Los objetivos del sistema son claros y evaluables",
  "Tarea", 
  "E11", 
  +6, 
  "Deseable", 
  "Difusa", 
  "No" 
  );
   $CHARACTERISTICS[39] = new Characteristic(  39, 
  "Los conocimientos están repartidos entre un conjunto de individuos",
  "Experto", 
  "E12", 
  -7, 
  "Deseable", 
  "Difusa", 
  "No" 
  );
   $CHARACTERISTICS[40] = new Characteristic(  40, 
  "Los directivos, usuarios, expertos e IC están de acuerdo en las funcionalidades del SE",
  "Directivos/Usuarios", 
  "E13", 
  +4, 
  "Esencial", 
  "Difusa", 
  "Sí" 
  );
   $CHARACTERISTICS[41] = new Characteristic(  41, 
  "La actitud de los expertos ante el desarrollo del sistema es positiva y no se sienten amenazados por el proyecto",
  "Experto", 
  "E14", 
  +8, 
  "Deseable", 
  "Difusa", 
  "No" 
  );
   $CHARACTERISTICS[42] = new Characteristic(  42, 
  "Los expertos convergen en sus soluciones y métodos",
  "Experto", 
  "E15", 
  +5, 
  "Deseable", 
  "Difusa", 
  "No" 
  );
   $CHARACTERISTICS[43] = new Characteristic(  43, 
  "Se acepta la planificación del proyecto propuesta por el IC",
  "Directivos/Usuarios", 
  "E16", 
  +8, 
  "Esencial", 
  "Booleana", 
  "Sí " 
  );
   $CHARACTERISTICS[44] = new Characteristic(  44, 
  "Existen limitaciones estrictas de tiempo en la realización del sistema",
  "Tarea", 
  "E17", 
  -6, 
  "Deseable", 
  "Difusa", 
  "No " 
  );
   $CHARACTERISTICS[45] = new Characteristic(  45, 
  "La dirección y usuarios apoyan los objetivos y directrices del proyecto",
  "Directivos/Usuarios", 
  "E18", 
  +7, 
  "Esencial", 
  "Difusa", 
  "Sí" 
  );
   $CHARACTERISTICS[46] = new Characteristic(  46, 
  "El nivel de formación requerido por los usuarios del sistema es elevado",
  "Directivos/Usuarios", 
  "E19", 
  -2, 
  "Deseable", 
  "Difusa", 
  "No" 
  );
   $CHARACTERISTICS[47] = new Characteristic(  47, 
  "Las relaciones IC-Experto son fluidas",
  "Experto", 
  "E20", 
  +4, 
  "Deseable", 
  "Difusa", 
  "No" 
  );
   $CHARACTERISTICS[48] = new Characteristic(  48, 
  "El proyecto forma parte de un camino crítico con otros sistemas",
  "Tarea", 
  "E21", 
  -6, 
  "Deseable", 
  "Booleana", 
  "No " 
  );
   $CHARACTERISTICS[49] = new Characteristic(  49, 
  "Se efectuará una adecuada transferencia tecnológica",
  "Directivos/Usuarios", 
  "E22", 
  +8, 
  "Esencial", 
  "Difusa", 
  "Sí" 
  );
   $CHARACTERISTICS[50] = new Characteristic(  50, 
  "Lo que cuenta en la solución es la calidad de la respuesta",
  "Tarea", 
  "E23", 
  +5, 
  "Deseable", 
  "Booleana", 
  "No" 
  );



/*
$CHARACTERISTICS[] = new Characteristic(
    ,   #ID
    "", #DENOMINATION
    "", #CATEGORIE
    "", #DIMENSION
    ,   #WEIGHT
    "", #TYPE
    "", #NATURE
    ""  #THRESHOLD
    );

*/


global $CHARACTERISTICS;
?>
